package com.cogent.dynamicform.form.impl;

import java.util.HashMap;

import com.cogent.common.util.MapUtil;
import com.cogent.dynamicform.domain.BaseFormColumnDomain;
import com.cogent.dynamicform.domain.FormColumnDomain;
import com.cogent.dynamicform.form.AbstractDynamicForm;

public class DumpBtnDynamicFormImpl extends AbstractDynamicForm {
	public String genInputField(FormColumnDomain formColumnDomain, HashMap formMap) {
		if(formColumnDomain.getShowtype() == 2)
			return "";
		else
			return "<a href=\"" + formColumnDomain.getTypecode() + "\">导出</a>";
	}
	
	public String getShowValue(BaseFormColumnDomain formColumnDomain, HashMap formMap) {
		if(formColumnDomain.getShowtype() == 1)
			return "";
		else
			return "<a href=\"" + formColumnDomain.getTypecode() + MapUtil.getStringValue(formMap, "id") + "\" target=\"_blank\">导出</a>";
	}
}
